package com.study.spring4;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AnnotationConfig {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext annotationConfigWebApplicationContext=new AnnotationConfigApplicationContext("com.study.spring4");
        System.out.println(annotationConfigWebApplicationContext.getBean(MyBean.class));
        System.out.println(annotationConfigWebApplicationContext.getBean(Cat.class));
        System.out.println(annotationConfigWebApplicationContext.getBean(User.class));

        annotationConfigWebApplicationContext.close();
    }
}
